package com.sch.hospital.domain;

import java.time.LocalDate;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用户信息对象 user
 * 
 * @author ruoyi
 * @date 2025-06-30
 */
public class User
{
    /** 用户ID，自增主键 */
    private Long id;

    /** 用户名 */
    private String userName;

    /** 联系电话 */
    private String telephone;

    /** 用户密码 */
    private String password;

    /** 真实姓名 */
    private String realName;

    /** 用户角色:0患者,1医生,2管理员 */
    private Long userRole;

    /** 最后登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date lastLogin;

    /** 登录次数 */
    private Long loginCount;

    /** 性别:0男,1女 */
    private Long sex;

    /** 出生日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    /** 身份证号 */
    private String idCard;

    /** 邮箱 */
    private String email;

    /** 地址 */
    private String address;

    /** 医疗保险 */
    private String insurance;

    /** 过敏史 */
    private String allergies;

    /** 头像路径 */
    private String avatar;

    /** 状态:0禁用,1正常 */
    private Long status;

    /** 创建时间 */
    private LocalDate createTime;

    /** 更新时间 */
    private LocalDate updateTime;

    public User() {
    }

    public User(Long id, String userName, String telephone, String password, String realName, Long userRole, Date lastLogin, Long loginCount, Long sex, Date birthday, String idCard, String email, String address, String insurance, String allergies, String avatar, Long status, LocalDate createTime, LocalDate updateTime) {
        this.id = id;
        this.userName = userName;
        this.telephone = telephone;
        this.password = password;
        this.realName = realName;
        this.userRole = userRole;
        this.lastLogin = lastLogin;
        this.loginCount = loginCount;
        this.sex = sex;
        this.birthday = birthday;
        this.idCard = idCard;
        this.email = email;
        this.address = address;
        this.insurance = insurance;
        this.allergies = allergies;
        this.avatar = avatar;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    /**
     * 获取
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取
     * @return userName
     */
    public String getUserName() {
        return userName;
    }

    /**
     * 设置
     * @param userName
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 获取
     * @return telephone
     */
    public String getTelephone() {
        return telephone;
    }

    /**
     * 设置
     * @param telephone
     */
    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    /**
     * 获取
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取
     * @return realName
     */
    public String getRealName() {
        return realName;
    }

    /**
     * 设置
     * @param realName
     */
    public void setRealName(String realName) {
        this.realName = realName;
    }

    /**
     * 获取
     * @return userRole
     */
    public Long getUserRole() {
        return userRole;
    }

    /**
     * 设置
     * @param userRole
     */
    public void setUserRole(Long userRole) {
        this.userRole = userRole;
    }

    /**
     * 获取
     * @return lastLogin
     */
    public Date getLastLogin() {
        return lastLogin;
    }

    /**
     * 设置
     * @param lastLogin
     */
    public void setLastLogin(Date lastLogin) {
        this.lastLogin = lastLogin;
    }

    /**
     * 获取
     * @return loginCount
     */
    public Long getLoginCount() {
        return loginCount;
    }

    /**
     * 设置
     * @param loginCount
     */
    public void setLoginCount(Long loginCount) {
        this.loginCount = loginCount;
    }

    /**
     * 获取
     * @return sex
     */
    public Long getSex() {
        return sex;
    }

    /**
     * 设置
     * @param sex
     */
    public void setSex(Long sex) {
        this.sex = sex;
    }

    /**
     * 获取
     * @return birthday
     */
    public Date getBirthday() {
        return birthday;
    }

    /**
     * 设置
     * @param birthday
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**
     * 获取
     * @return idCard
     */
    public String getIdCard() {
        return idCard;
    }

    /**
     * 设置
     * @param idCard
     */
    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    /**
     * 获取
     * @return email
     */
    public String getEmail() {
        return email;
    }

    /**
     * 设置
     * @param email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * 获取
     * @return address
     */
    public String getAddress() {
        return address;
    }

    /**
     * 设置
     * @param address
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 获取
     * @return insurance
     */
    public String getInsurance() {
        return insurance;
    }

    /**
     * 设置
     * @param insurance
     */
    public void setInsurance(String insurance) {
        this.insurance = insurance;
    }

    /**
     * 获取
     * @return allergies
     */
    public String getAllergies() {
        return allergies;
    }

    /**
     * 设置
     * @param allergies
     */
    public void setAllergies(String allergies) {
        this.allergies = allergies;
    }

    /**
     * 获取
     * @return avatar
     */
    public String getAvatar() {
        return avatar;
    }

    /**
     * 设置
     * @param avatar
     */
    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    /**
     * 获取
     * @return status
     */
    public Long getStatus() {
        return status;
    }

    /**
     * 设置
     * @param status
     */
    public void setStatus(Long status) {
        this.status = status;
    }

    /**
     * 获取
     * @return createTime
     */
    public LocalDate getCreateTime() {
        return createTime;
    }

    /**
     * 设置
     * @param createTime
     */
    public void setCreateTime(LocalDate createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取
     * @return updateTime
     */
    public LocalDate getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置
     * @param updateTime
     */
    public void setUpdateTime(LocalDate updateTime) {
        this.updateTime = updateTime;
    }

    public String toString() {
        return "User{id = " + id + ", userName = " + userName + ", telephone = " + telephone + ", password = " + password + ", realName = " + realName + ", userRole = " + userRole + ", lastLogin = " + lastLogin + ", loginCount = " + loginCount + ", sex = " + sex + ", birthday = " + birthday + ", idCard = " + idCard + ", email = " + email + ", address = " + address + ", insurance = " + insurance + ", allergies = " + allergies + ", avatar = " + avatar + ", status = " + status + ", createTime = " + createTime + ", updateTime = " + updateTime + "}";
    }
}
